<?php
namespace app\admin\model\user;

use think\Model;
use think\facade\Db;

class UsersModel extends Model
{
    protected $name = 'users';
    // 主键
    protected $pk = 'id';
    protected $hidden = ['password','pay_pass'];
    protected $autoWriteTimestamp = 'int';
    protected $createTime = 'created_at';
    protected $updateTime = 'updated_at';
    public function getLastLoginAtAttr($value)
    {
        return $value ? date('Y-m-d H:i:s', $value) : null;
    }
}